//
//  WBBaseViewController.swift
//  SinaWeibo
//
//  Created by 张晗 on 2017/1/26.
//  Copyright © 2017年 zhanghan. All rights reserved.
//

import UIKit

class WBBaseViewController: UIViewController {
    
    lazy var customNavItem = UINavigationItem()
    fileprivate lazy var customNavBar = UINavigationBar()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setupUI()
    }
}

extension WBBaseViewController {
    func setupUI() {
        view.backgroundColor = UIColor.white
        
        customNavBar.frame = CGRect(x: 0, y: 0, width: UIScreen.cz_screenWidth(), height: 64)
        customNavBar.items = [customNavItem]
        view.addSubview(customNavBar)
    }

    override var title: String? {
        didSet {
            customNavItem.title = title
        }
    }
}
